<?php

/**
 * @author игорь
 * @copyright 2009
 */
$action_template = "category";
$category = $selected_cat;
$items = $db->fetch_array("SELECT SQL_CALC_FOUND_ROWS * FROM $table_games WHERE category_id = '".$selected_cat_id."' AND status = '2' ORDER BY rating DESC LIMIT $lim_from,$per_page");
if(!empty($items))
{
	$qnty = $db->fetch_one(QUANTITY);
	per_page_navigation($qnty[0],$per_page,$from);
	foreach($items as $k=>$v)
	{
		if($v['image'] == '1')
		{
			$items[$k]['image'] = UPLOAD."flash/".$v['id'];
		}
		else $items[$k]['image'] = false;
	}
	$smarty->assign("items",$items);
	
}
$smarty->assign("category",$category);
$this->adress_string[] = array(
	'title' =>$category['title'],
	'menu_title' =>$category['title'],
	'alias' => SITE_URL.$this->full_alias."cat_".$category['alias']."/"
);
$header = "Флеш ".$category['title'];
$smarty->assign("header",$header);
$this->info['title'] = $header.". ".$this->info['title'];
?>